//
//  SettingUtils.m
//  InterventixApp
//
//  Created by Diego Falcinelli on 30/06/13.
//
//

#import "SettingUtils.h"
#import "ComunicationsUtils.h"
#import "Define.h"

@implementation SettingUtils

+(void) set:(NSString *)defineKey obj:(id)obj user:(NSString *)iduser{
    NSString *key = [NSString stringWithFormat:@"%@_%@_%d",defineKey,iduser,abs([[ComunicationsUtils getBaseUrl] hash])];
    [[NSUserDefaults standardUserDefaults] setObject:obj forKey:key];
}
+(id) get:(NSString *)defineKey user:(NSString *)iduser{
    NSString *key = [NSString stringWithFormat:@"%@_%@_%d",defineKey,iduser,abs([[ComunicationsUtils getBaseUrl] hash])];
    return [[NSUserDefaults standardUserDefaults] objectForKey:key];
}
+(void) del:(NSString *)defineKey user:(NSString *)iduser{
    NSString *key = [NSString stringWithFormat:@"%@_%@_%d",defineKey,iduser,abs([[ComunicationsUtils getBaseUrl] hash])];
    [[NSUserDefaults standardUserDefaults] removeObjectForKey:key];
}

@end
